package demo3;

import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 晓星航
 * Date: 2022-11-16
 * Time: 20:21
 */
class Student {
    public int age;
    public String name;
    public double score;

    public Student(int age,String name,double score) {
        this.age = age;
        this.name = name;
        this.score = score;
    }
    @Override
    public String toString() {
        return "Student{" +
                "age=" + age +
                ", name='" + name + '\'' +
                ", score=" + score +
                '}';
    }
}
public class Test {

    public static void main(String[] args) {
        3c
    }
    public static void main2(String[] args) {
        Student[] students = new Student[3];
        students[0] = new Student(12,"bit",98.9);
        students[1] = new Student(6,"anc",18.9);
        students[2] = new Student(18,"zhangsan",28.6);
        System.out.println(Arrays.toString(students));
        Arrays.sort(students);
        System.out.println(Arrays.toString(students));
    }
    public static void main1(String[] args) {
        int[] array = {1,21,3,14,5,16};
        System.out.println(Arrays.toString(array));
        Arrays.sort(array);
        System.out.println(Arrays.toString(array));
    }
}
